<template>
	<view>
		<view class="top" :style="{'backgroundImage': 'url('+ backgroundUrl +')'}">
			<view class="user">
				<view class="headimg">
					<image :src="avatarUrl"></image>
				</view>
				<span class="username">{{nickname}}</span>
				<button>+关注</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['avatarUrl','backgroundUrl','nickname'],
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
	.top{
		width: 100%;
		height: 240px;
		background-position: 50%;
		background-size: cover;
		display: flex;
		align-items: center;
		.user{
			width: 100%;
			height: 145px;
			//background-color: red;
			display: flex;
			flex-direction:column;
			justify-content: center;
			align-items: center;
			.headimg{
				width: 80px;
				height: 80px;
				//background-color: yellow;
				image{
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}
			.username{
				color: white;
				font-weight: 400;
				margin-top: 5px;
			}
			button{
				font-size: 13px;
				width: 126px;
				height: 30px;
				margin-top: 5px;
				border: 1px solid hsla(0,0%,100%,.8);
				border-radius: 15px;
			}
		}
	}
</style>
